package com.zl.registration.module.prefix;

import java.io.Serializable;

/**
 * 用户信息的key前缀
 * @author zoulei
 */
public class UserKeyPrefix extends BaseKeyPrefix  implements Serializable {

    /**
     * 缓存有效时间为30min
     */
    public static final long TOKEN_EXPIRE = 30*60000L;

    public UserKeyPrefix(long expireSeconds, String prefix) {
        super(expireSeconds, prefix);
    }
    /**
     * 用户cookie
     */
    public static final UserKeyPrefix TOKEN = new UserKeyPrefix(TOKEN_EXPIRE, "token");

    /**
     * 用于存储用户对象到redis的key前缀
     */
    public static final UserKeyPrefix GET_USER_BY_ID = new UserKeyPrefix(0, "id");
    public static final UserKeyPrefix USER_PHONE = new UserKeyPrefix(30*60000L, "id");

}
